home *** CD-ROM | disk | FTP | other *** search
/ Macintosh Technology Seed 1996 September / Macintosh Technology Seed (September 1996) (CDRM1437020).ISO / pc / qd3d15d6 / 15d6_sdk.exe / QD3D Win32 1.5d6 / Interfaces / QD3DStyle.h < prev    next >
C/C++ Source or Header  |  1996-08-21  |  10KB  |  353 lines

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        QD3DStyle.h                                                 **
  4.  **                                                                          **
  5.  **                                                                          **
  6.  **     Purpose:     Style types and routines                                  **
  7.  **                                                                          **
  8.  **                                                                          **
  9.  **                                                                          **
  10.  **     Copyright (C) 1992-1995 Apple Computer, Inc.  All rights reserved.     **
  11.  **                                                                          **
  12.  **                                                                          **
  13.  *****************************************************************************/
  14. #ifndef QD3DStyle_h
  15. #define QD3DStyle_h
  16.  
  17. #if defined(PRAGMA_ONCE) && PRAGMA_ONCE
  18.     #pragma once
  19. #endif  /*  PRAGMA_ONCE  */
  20.  
  21. #if defined(THINK_C) || defined(__SC__)
  22.     #pragma options(!pack_enums, !align_arrays)
  23.     #pragma SC options align=power
  24. #elif defined(__MWERKS__)
  25.     #pragma enumsalwaysint on
  26.     #pragma align_array_members off
  27.     #pragma options align=native
  28. #elif defined(__PPCC__)
  29.     #pragma options align=power
  30. #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
  31.     #pragma options enum=int
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif    /* __cplusplus */
  37.  
  38.  
  39. /******************************************************************************
  40.  **                                                                             **
  41.  **                            Style Base Class Routines                         **
  42.  **                                                                             **
  43.  *****************************************************************************/
  44.  
  45. QD3D_EXPORT TQ3ObjectType Q3Style_GetType(
  46.     TQ3StyleObject            style);
  47.  
  48. QD3D_EXPORT TQ3Status Q3Style_Submit(
  49.     TQ3StyleObject            style, 
  50.     TQ3ViewObject            view);
  51.  
  52.  
  53. /******************************************************************************
  54.  **                                                                             **
  55.  **                                 Subdivision                                 **
  56.  **                                                                             **
  57.  *****************************************************************************/
  58.  
  59. typedef enum TQ3SubdivisionMethod {
  60.     kQ3SubdivisionMethodConstant,
  61.     kQ3SubdivisionMethodWorldSpace,
  62.     kQ3SubdivisionMethodScreenSpace
  63. } TQ3SubdivisionMethod;
  64.  
  65.  
  66. typedef struct TQ3SubdivisionStyleData {
  67.     TQ3SubdivisionMethod            method;
  68.     float                            c1;
  69.     float                            c2;
  70. } TQ3SubdivisionStyleData;
  71.  
  72.  
  73. QD3D_EXPORT TQ3StyleObject Q3SubdivisionStyle_New(
  74.     const TQ3SubdivisionStyleData    *data);
  75.  
  76. QD3D_EXPORT TQ3Status Q3SubdivisionStyle_Submit(
  77.     const TQ3SubdivisionStyleData    *data,
  78.     TQ3ViewObject                    view);
  79.  
  80. QD3D_EXPORT TQ3Status Q3SubdivisionStyle_SetData(
  81.     TQ3StyleObject                    subdiv,
  82.     const TQ3SubdivisionStyleData    *data);
  83.  
  84. QD3D_EXPORT TQ3Status Q3SubdivisionStyle_GetData(
  85.     TQ3StyleObject                    subdiv,
  86.     TQ3SubdivisionStyleData            *data);
  87.  
  88.  
  89. /******************************************************************************
  90.  **                                                                             **
  91.  **                                Pick ID                                         **
  92.  **                                                                             **
  93.  *****************************************************************************/
  94.  
  95. QD3D_EXPORT TQ3StyleObject Q3PickIDStyle_New(
  96.     unsigned long            id);
  97.     
  98. QD3D_EXPORT TQ3Status Q3PickIDStyle_Submit(
  99.     unsigned long            id,
  100.     TQ3ViewObject            view);
  101.  
  102. QD3D_EXPORT TQ3Status Q3PickIDStyle_Get(
  103.     TQ3StyleObject            pickIDObject,
  104.     unsigned long            *id);
  105.  
  106. QD3D_EXPORT TQ3Status Q3PickIDStyle_Set(
  107.     TQ3StyleObject            pickIDObject,
  108.     unsigned long            id);
  109.     
  110.     
  111. /******************************************************************************
  112.  **                                                                             **
  113.  **                                Pick Parts                                     **
  114.  **                                                                             **
  115.  *****************************************************************************/
  116.  
  117. typedef enum TQ3PickPartsMasks {
  118.     kQ3PickPartsObject        = 0,
  119.     kQ3PickPartsMaskFace    = 1 << 0,
  120.     kQ3PickPartsMaskEdge    = 1 << 1,
  121.     kQ3PickPartsMaskVertex    = 1 << 2
  122. } TQ3PickPartsMasks;
  123.  
  124. typedef unsigned long TQ3PickParts;
  125.  
  126. QD3D_EXPORT TQ3StyleObject Q3PickPartsStyle_New(
  127.     TQ3PickParts            parts);
  128.     
  129. QD3D_EXPORT TQ3Status Q3PickPartsStyle_Submit(
  130.     TQ3PickParts            parts,
  131.     TQ3ViewObject            view);
  132.  
  133. QD3D_EXPORT TQ3Status Q3PickPartsStyle_Get(
  134.     TQ3StyleObject            pickPartsObject,
  135.     TQ3PickParts            *parts);
  136.  
  137. QD3D_EXPORT TQ3Status Q3PickPartsStyle_Set(
  138.     TQ3StyleObject            pickPartsObject,
  139.     TQ3PickParts            parts);
  140.  
  141.  
  142. /******************************************************************************
  143.  **                                                                             **
  144.  **                            Receive Shadows                                     **
  145.  **                                                                             **
  146.  *****************************************************************************/
  147.  
  148. QD3D_EXPORT TQ3StyleObject Q3ReceiveShadowsStyle_New(
  149.     TQ3Boolean                receives);
  150.     
  151. QD3D_EXPORT TQ3Status Q3ReceiveShadowsStyle_Submit(
  152.     TQ3Boolean                receives,
  153.     TQ3ViewObject            view);
  154.  
  155. QD3D_EXPORT TQ3Status Q3ReceiveShadowsStyle_Get(
  156.     TQ3StyleObject            styleObject,
  157.     TQ3Boolean                *receives);
  158.  
  159. QD3D_EXPORT TQ3Status Q3ReceiveShadowsStyle_Set(
  160.     TQ3StyleObject            styleObject,
  161.     TQ3Boolean                receives);
  162.  
  163.  
  164. /******************************************************************************
  165.  **                                                                             **
  166.  **                            Fill Styles                                         **
  167.  **                                                                             **
  168.  *****************************************************************************/
  169.  
  170. typedef enum TQ3FillStyle {
  171.     kQ3FillStyleFilled,
  172.     kQ3FillStyleEdges,
  173.     kQ3FillStylePoints
  174. } TQ3FillStyle;
  175.  
  176.  
  177. QD3D_EXPORT TQ3StyleObject Q3FillStyle_New(
  178.     TQ3FillStyle             fillStyle);
  179.  
  180. QD3D_EXPORT TQ3Status Q3FillStyle_Submit(
  181.     TQ3FillStyle             fillStyle,
  182.     TQ3ViewObject             view);
  183.  
  184. QD3D_EXPORT TQ3Status Q3FillStyle_Get(
  185.     TQ3StyleObject            styleObject,
  186.     TQ3FillStyle            *fillStyle);
  187.  
  188. QD3D_EXPORT TQ3Status Q3FillStyle_Set(
  189.     TQ3StyleObject            styleObject,
  190.     TQ3FillStyle            fillStyle);
  191.     
  192.     
  193. /******************************************************************************
  194.  **                                                                             **
  195.  **                            Backfacing Styles                                 **
  196.  **                                                                             **
  197.  *****************************************************************************/
  198.  
  199. typedef enum TQ3BackfacingStyle {
  200.     kQ3BackfacingStyleBoth,
  201.     kQ3BackfacingStyleRemove,
  202.     kQ3BackfacingStyleFlip
  203. } TQ3BackfacingStyle;
  204.  
  205. QD3D_EXPORT TQ3StyleObject Q3BackfacingStyle_New(
  206.     TQ3BackfacingStyle        backfacingStyle);
  207.  
  208. QD3D_EXPORT TQ3Status Q3BackfacingStyle_Submit(
  209.     TQ3BackfacingStyle        backfacingStyle,
  210.     TQ3ViewObject            view);
  211.  
  212. QD3D_EXPORT TQ3Status Q3BackfacingStyle_Get(
  213.     TQ3StyleObject            backfacingObject,
  214.     TQ3BackfacingStyle        *backfacingStyle);
  215.  
  216. QD3D_EXPORT TQ3Status Q3BackfacingStyle_Set(
  217.     TQ3StyleObject            backfacingObject,
  218.     TQ3BackfacingStyle        backfacingStyle);
  219.  
  220.  
  221. /******************************************************************************
  222.  **                                                                             **
  223.  **                            Interpolation Types                                 **
  224.  **                                                                             **
  225.  *****************************************************************************/
  226.  
  227. typedef enum TQ3InterpolationStyle {
  228.     kQ3InterpolationStyleNone,
  229.     kQ3InterpolationStyleVertex,
  230.     kQ3InterpolationStylePixel
  231. } TQ3InterpolationStyle;
  232.  
  233. QD3D_EXPORT TQ3StyleObject Q3InterpolationStyle_New(
  234.     TQ3InterpolationStyle    interpolationStyle);
  235.  
  236. QD3D_EXPORT TQ3Status Q3InterpolationStyle_Submit(
  237.     TQ3InterpolationStyle     interpolationStyle,
  238.     TQ3ViewObject            view);
  239.  
  240. QD3D_EXPORT TQ3Status Q3InterpolationStyle_Get(
  241.     TQ3StyleObject            interpolationObject,
  242.     TQ3InterpolationStyle    *interpolationStyle);
  243.  
  244. QD3D_EXPORT TQ3Status Q3InterpolationStyle_Set(
  245.     TQ3StyleObject            interpolationObject,
  246.     TQ3InterpolationStyle    interpolationStyle);
  247.  
  248.  
  249. /******************************************************************************
  250.  **                                                                             **
  251.  **                                Highlight Style                                 **
  252.  **                                                                             **
  253.  *****************************************************************************/
  254.  
  255. QD3D_EXPORT TQ3StyleObject Q3HighlightStyle_New(
  256.     TQ3AttributeSet            highlightAttribute);
  257.     
  258. QD3D_EXPORT TQ3Status Q3HighlightStyle_Submit(
  259.     TQ3AttributeSet            highlightAttribute,
  260.     TQ3ViewObject            view);
  261.  
  262. QD3D_EXPORT TQ3Status Q3HighlightStyle_Get(
  263.     TQ3StyleObject            highlight,
  264.     TQ3AttributeSet            *highlightAttribute);
  265.  
  266. QD3D_EXPORT TQ3Status Q3HighlightStyle_Set(
  267.     TQ3StyleObject            highlight,
  268.     TQ3AttributeSet            highlightAttribute);
  269.  
  270.  
  271. /******************************************************************************
  272.  **                                                                             **
  273.  **                            FrontFacing Direction Styles                     **
  274.  **                                                                             **
  275.  *****************************************************************************/
  276.  
  277. typedef enum TQ3OrientationStyle{
  278.     kQ3OrientationStyleCounterClockwise,
  279.     kQ3OrientationStyleClockwise
  280. } TQ3OrientationStyle;
  281.  
  282. QD3D_EXPORT TQ3StyleObject Q3OrientationStyle_New(
  283.     TQ3OrientationStyle        frontFacingDirection);
  284.  
  285. QD3D_EXPORT TQ3Status Q3OrientationStyle_Submit(
  286.     TQ3OrientationStyle        frontFacingDirection,
  287.     TQ3ViewObject            view);
  288.  
  289. QD3D_EXPORT TQ3Status Q3OrientationStyle_Get(
  290.     TQ3StyleObject            frontFacingDirectionObject,
  291.     TQ3OrientationStyle        *frontFacingDirection);
  292.  
  293. QD3D_EXPORT TQ3Status Q3OrientationStyle_Set(
  294.     TQ3StyleObject            frontFacingDirectionObject,
  295.     TQ3OrientationStyle        frontFacingDirection);
  296.  
  297.  
  298. #if defined(ESCHER_VER_FUTURE) && ESCHER_VER_FUTURE
  299.  
  300. /******************************************************************************
  301.  **                                                                             **
  302.  **                                AntiAlias Style                                 **
  303.  **                                                                             **
  304.  *****************************************************************************/
  305.  
  306. typedef enum TQ3AntiAliasStyleMethod {
  307.     kQ3AntiAliasMethodOff,
  308.     kQ3AntiAliasMethodEdges,
  309.     kQ3AntiAliasMethodFilled
  310. } TQ3AntiAliasStyleMethod;
  311.  
  312. typedef enum TQ3AntiAliasStyleQuality {
  313.     kQ3AntiAliasQualityLow        = 1,
  314.     kQ3AntiAliasQualityMedium    = 2,
  315.     kQ3AntiAliasQualityHigh        = 3
  316. } TQ3AntiAliasStyleQuality;
  317.  
  318. typedef struct TQ3AntiAliasStyleData {
  319.     TQ3AntiAliasStyleMethod        method;
  320.     TQ3AntiAliasStyleQuality    quality;
  321. } TQ3AntiAliasStyleData;
  322.  
  323.  
  324. QD3D_EXPORT TQ3StyleObject Q3AntiAliasStyle_New(
  325.     const TQ3AntiAliasStyleData        *data);
  326.  
  327. QD3D_EXPORT TQ3Status Q3AntiAliasStyle_Submit(
  328.     const TQ3AntiAliasStyleData        *data,
  329.     TQ3ViewObject                    view);
  330.  
  331. QD3D_EXPORT TQ3Status Q3AntiAliasStyle_GetData(
  332.     TQ3StyleObject                    styleObject,
  333.     TQ3AntiAliasStyleData            *data);
  334.  
  335. QD3D_EXPORT TQ3Status Q3AntiAliasStyle_SetData(
  336.     TQ3StyleObject                    styleObject,
  337.     const TQ3AntiAliasStyleData        *data);
  338.  
  339. #endif /* ESCHER_VER_FUTURE */
  340.  
  341.  
  342. #ifdef __cplusplus
  343. }
  344. #endif    /* __cplusplus */
  345.  
  346. #if defined(__MWERKS__)
  347.     #pragma enumsalwaysint reset
  348. #elif defined(__xlc) || defined(__xlC) || defined(__xlC__) || defined(__XLC121__)
  349.     #pragma options enum=reset
  350. #endif
  351.  
  352. #endif  /*  QD3DStyle_h  */
  353.